public class test2 {
    //力扣 283.移动零
    public void moveZeroes(int[] nums) {
        int cur = 0,dest = -1;
        for(cur = 0;cur<nums.length;cur++){
            if(nums[cur]!=0){
                dest++;
                int tmp = nums[dest];
                nums[dest] = nums[cur];
                nums[cur] = tmp;
            }
        }
    }
}
